// models/meta-model.model.ts
export interface MetaModelField {
  field: string; // 字段名，如 "cod"
  name: string; // 字段中文名，如 "工单编码"
  type?: string; // 字段类型，可选，如 "string", "number", "date"
}

/**
 * 数据元模型定义
 */
export class DataMetaModel {
  name: string; // 元模型名称，如 "工单"
  isCollection: boolean; // 是否为集合（数组）
  fields: MetaModelField[];

  constructor(
    name: string,
    isCollection: boolean = false,
    fields: MetaModelField[] = []
  ) {
    this.name = name;
    this.isCollection = isCollection;
    this.fields = fields;
  }
}
